/**
 * jQuery Echart 插件
 *
 * 用法
 * $(el).echartSet(options);
 */
!(function ($) {
  var timer;
  $.fn.echartSet = function (option) {
    return this.each(function () {
      clearTimeout(timer);
      var ec = echarts.init($(this)[0], "theme"),
        timer;
      ec.setOption(option);
      $(window).resize(function () {
        timer = setTimeout(ec.resize, 100);
      });
    });
  };
})(jQuery);
